<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
	<form class="form-horizontal business-form" id="credit-infoi">
		<div class="current-state-bno">
			<div class="submit-buttonleft">
				<button id="gaSave"
					class="btn-danger-my btn  btn-primary" type="button"
					onclick="gaSaveOrUpdate();">保存</button>
				<button style="display: none" id="gaUpdate"
					class="btn-danger-my btn  btn-primary" type="button"
					onclick="gaSaveOrUpdate();">修改</button>
			</div>
		</div>
		<input type="hidden" id="gaId" />
		<div class="business-manwife">公安刑事记录</div>
		<div class="padding-nono">
			<table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table">
				<tr>
					<td align="right"><label class="control-label np">案发时间：</label>
					</td>
					<td><input id="af_time"
						class="smallicontm form-control" onclick="laydate()" />
					</td>
					<td align="right"><label class="control-label np">案发地：</label>
					</td>
					<td><input id="afAddr" type="text" class="form-control" /></td>
				</tr>
				<tr>	
					<td align="right"><label class="control-label np">案件跟踪：</label>
					</td>
					<td colspan="3"><input id="caseTracking" type="text" class="form-control" /></td>
				</tr>
					<td align="right" valign="top"><label class="control-label np">信息备注：</label>
					</td>
					<td colspan="3"><textarea id="afRemarks" rows="" cols="" class="form-control"></textarea></td>
				</tr>
				<tr>
			</table>
		</div>
		<div class="business-manwife clear-both">经办信息</div>
		<div class="padding-nono">
			<table cellpadding="0" cellspacing="0" border="0"
				class="buyinfor-table">
				<tr>
					<td align="right"><label class="control-label np">经办人：</label>
					</td>
					<td><input id="afszOperator" readonly="readonly"
						type="text" class="form-control"
						value="${current_user_key.uname}" /></td>
					<td align="right"><label class="control-label np">录入日期：</label>
					</td>
					<td><input id="afsz_date" readonly="readonly"
						type="text" class="form-control"
						required="" aria-required="true"  />
					</td>
				</tr>
			</table>
		</div>
	</form>
	
	<%@include file="/jsp/comm_js_include.jsp"%>
	<script type="text/javascript">
	var gaSaveOrUpdate=function(){
    	var data={};
    	var url='${basePath}/DhOverdueCriminalRecordController/save';
    	if($("#gaId").val()!=""){
    		data.id=$("#gaId").val();
    		url='${basePath}/DhOverdueCriminalRecordController/modify';
    	}else{
        	data.busiId= $.getUrlData("busiId");
        	data.cusId= $.getUrlData("cusId");
        	data.overdueId= $.getUrlData("overdueId");
    	}
    	data.timeRecord=$("#af_time").val();
    	data.addrRecond=$("#afAddr").val();
    	data.remark=$("#afRemarks").val();
    	data.caseTracking=$("#caseTracking").val();
    	$.dpAjax({
    		show:false,
    		url:url,
    		data:data,
			success: function(datas){
				layer.msg('执行成功！', {icon: 6});
			    return;
             }
    	});
    }
	
	var getGaDataById=function(){
    	var data={};
		data.busiId=$.getUrlData("busiId");
		$.dpAjax({
			show:false,
    		url:'${basePath}/DhOverdueCriminalRecordController/list',
			data:data,
			success: function(datas){
			  var data=datas.result.rows;
			  if(data.length>0){
				  $("#caseTracking").val(data[0].caseTracking);
				  $("#gaId").val(data[0].replaceId);
				  $("#af_time").val(data[0].timeRecord);
				  $("#afAddr").val(data[0].addrRecond);
				  $("#afRemarks").val(data[0].remark);
				  $("#afsz_date").val(data[0].jbTime);
				  $("#gaSave").hide();
				  $("#gaUpdate").show();
				  return;
			  }
            }
    	});
    }
	</script>